package observer.example;

/**
 * @author Chen Guang
 * @date 2019/4/9 0009 下午 16:21
 */
public class Test {
    public static void main(String[] args) {
        Subject boss = new BossSubject();
        //看股票的同事
        Observer stock = new StockObserver(boss, "魏关斋");
        //看NBA的同事
        Observer nba = new NBAObserver(boss, "易管查");

        boss.attach(stock);
        boss.attach(nba);

        boss.setSubjectState("不是针对谁，在座的各位都是辣鸡");
        boss.notifyObserver();
    }
}
